package com.qkst.website.backstage.service.impl;

import java.util.List;

import javax.annotation.Resource;
import javax.xml.rpc.ServiceException;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.qkst.website.backstage.entity.EtlServerInfo;
import com.qkst.website.backstage.mapper.EtlServerInfoMapper;
import com.qkst.website.backstage.service.EtlServerInfoServer;

@Service("etlServerInfoServer")
@Transactional
public class EtlServerInfoServerImpl implements EtlServerInfoServer {
	@Resource(name = "etlServerInfoMapper")
	private EtlServerInfoMapper etlServerInfoMapper;

	/**
	 * 获取所以的服务状态信息
	 * @return
	 * @throws ServiceException
	 */
	public List<EtlServerInfo> getByAll(){
		EtlServerInfo etlInfo = new EtlServerInfo();
		etlInfo.setPage(1);
		etlInfo.setRows(20);
		return etlServerInfoMapper.selectAllInfo(etlInfo);
	}
	/**
	 * 获取指定的服务状态信息
	 * @param etlserverid
	 * @return
	 * @throws ServiceException
	 */
	public  EtlServerInfo getinfoByPK(String etlserverid){
		return etlServerInfoMapper.selectByPrimaryKey(etlserverid);
	}

}
